<script setup>
import { ref } from 'vue'
import GameBelowItem from './components/GameBelowItem.vue'
import { fetchGameList } from '@/api/game'
let list = [1, 2, 3, 4]
let buttonColo = '#f5f5f5'
let btnType = 'gain'
let textColor = '#818181'
const onClickLeft = () => history.back()
const recommendListData = ref([])
// 获取首页"游戏列表"列表
let gameDataList = ref([])
const getNewList = async () => {
  let data = await fetchGameList({})

  gameDataList.value = data
}
getNewList()
</script>

<template>
  <div class="application-list-view">
    <van-nav-bar title="游戏列表" left-text="游戏" left-arrow @click-left="onClickLeft" />
    <GameBelowItem
      v-for="(item, index) in gameDataList"
      :key="index"
      :itemData="item"
      :indexMark="index"
      class="application-box-introduce"
      :buttonColo="buttonColo"
      :itemType="'cloud'"
      :textColor="textColor"
    ></GameBelowItem>
  </div>
</template>

<style lang="scss" scoped>
.application-list-view {
  padding: 0 14px;
}
</style>
